<?php
class Rulemanager_Model_Rulemanager implements Rulemanager_Model_Mainable{
    
    private $action_handler;
    
    public function main(array $variables = null) {
        if(isset($variables['get']['page'])){
            $this->action_handler = new Rulemanager_Model_Pagedecision;
            return $this->action_handler->main($variables);
        }
        else {
            $page['template'] = WEB_ROOT_FOLDER."rulemanager/views/allrules.php";
            $this->action_handler = new Rulemanager_Data_Getallrules;
            $page['content'] = $this->action_handler->main($variables);
            return $page;
        }
    }
}
